package auth

import com.nimbusds.jose.jwk.JWKSet
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RestController

import javax.annotation.Resource

@RestController
class EmbeddedJwkSetController {
    @Resource
    private JWKSet jwkSet

    @GetMapping("/.certs/jwks.json")
    Map<String, Object> keys() {
        this.jwkSet.toJSONObject()
    }
}
